@import url(../fonts/clear-sans.css);
html, body {
  margin: 0;
  padding: 0;
  font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
}

.heading:after {
  content: "";
  display: block;
  clear: both; }

h1.title {
  font-size: 80px;
  font-weight: bold;
  margin: 0;
  display: block;
  float: left; }

@-webkit-keyframes move-up {
  0% {
    top: 25px;
    opacity: 1; }

  100% {
    top: -50px;
    opacity: 0; } }
@-moz-keyframes move-up {
  0% {
    top: 25px;
    opacity: 1; }

  100% {
    top: -50px;
    opacity: 0; } }
@keyframes move-up {
  0% {
    top: 25px;
    opacity: 1; }

  100% {
    top: -50px;
    opacity: 0; } }
.scores-container {
  float: right;
  text-align: right; }

.score-container, .best-container {
  width:100%;height:100%;
  position: relative;
  display: inline-block;
  font-size: 25px;
  line-height:100%;
  border-radius: 3px;
  color:#000;
  margin-top: 8px;
  text-align: center;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  padding-top:.6rem;
}
  .score-container:after, .best-container:after {
    position: absolute;
    width: 100%;
    top: 10px;
    left: 0;
    text-transform: uppercase;
    font-size: 13px;
    line-height: 13px;
    text-align: center;
    color: #000;
  }
  .score-container .score-addition, .best-container .score-addition {
    position: absolute;
    right: 30px;
    color: red;
    font-size: 25px;
    line-height: 25px;
    font-weight: bold;
    color: rgba(119, 110, 101, 0.9);
    z-index: 100;
    -webkit-animation: move-up 600ms ease-in;
    -moz-animation: move-up 600ms ease-in;
    animation: move-up 600ms ease-in;
    -webkit-animation-fill-mode: both;
    -moz-animation-fill-mode: both;
    animation-fill-mode: both; }

.score-container:after {
  content: "得分";font-size:0.32rem;
}

.best-container:after {
  content: "历史最高";font-size:0.32rem;
}

strong.important {
  text-transform: uppercase; }

hr {
  border: none;
  border-bottom: 1px solid #d8d4d0;
  margin-top: 20px;
  margin-bottom: 30px; }

.container {width:100%;height:100%;}

@-webkit-keyframes fade-in {
  0% {
    opacity: 0; }

  100% {
    opacity: 1; } }
@-moz-keyframes fade-in {
  0% {
    opacity: 0; }

  100% {
    opacity: 1; } }
@keyframes fade-in {
  0% {
    opacity: 0; }

  100% {
    opacity: 1; } }
.game-container {
  position: relative;
  cursor: default;
  -webkit-touch-callout: none;
  -ms-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -ms-touch-action: none;
  touch-action: none;
  background: #f5f1da;
  width:100%;
  height:100%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box; }
  .game-container .game-message {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(238, 228, 218, 0.5);
    z-index: 100;
    text-align: center;
    }
    .game-container .game-message p {
      font-size: 60px;
      font-weight: bold;
      height: 60px;
      line-height: 60px;
      margin-top: 222px; }
    .game-container .game-message .lower {
      display: block;
      margin-top: 59px; }
    .game-container .game-message a {
      display: inline-block;
      background: #8f7a66;
      border-radius: 3px;
      padding: 0 20px;
      text-decoration: none;
      color: #f9f6f2;
      height: 40px;
      line-height: 42px;
      margin-left: 9px; }
      .game-container .game-message a.keep-playing-button {
        display: none; }
    .game-container .game-message.game-won {
      background: rgba(237, 194, 46, 0.5);
      color: #f9f6f2; }
      .game-container .game-message.game-won a.keep-playing-button {
        display: inline-block; }
    .game-container .game-message.game-won, .game-container .game-message.game-over {
      display: none; }

.grid-container {
  position: absolute;
  z-index: 1;
  width:6.55rem;
  height:6.55rem;
  top:50%;left:50%;margin:-3.275rem 0 0 -3.275rem;
}

.grid-row {
  margin-bottom: .22rem; }
  .grid-row:last-child {
    margin-bottom: 0; }
  .grid-row:after {
    content: "";
    display: block;
    clear: both; }

.grid-cell {
  width: 1.47rem;
  height: 1.47rem;
  margin-right: .22rem;
  float: left;
  border-radius: 7px;
  background: #ddd5af;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  border:.05rem solid #000;
}
  .grid-cell:last-child {
    margin-right: 0; }

.tile-container {
  position: absolute;
  z-index: 2;
  width:6.55rem;
  height:6.55rem;
  top:50%;left:50%;margin:-3.275rem 0 0 -3.275rem;
}

.tile, .tile .tile-inner {
  width: 1.47rem;
  height: 1.47rem;
  line-height: 1.37rem;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;

}
/*.tile.tile-position-1-1 {*/
  /*-webkit-transform: translate(0, 0);*/
  /*-moz-transform: translate(0, 0);*/
  /*-ms-transform: translate(0, 0);*/
  /*transform: translate(0, 0); }*/
/*.tile.tile-position-1-2 {*/
  /*-webkit-transform: translate(0, 1.69rem);*/
  /*-moz-transform: translate(0, 1.69rem);*/
  /*-ms-transform: translate(0, 1.69rem);*/
  /*transform: translate(0, 1.69rem); }*/
/*.tile.tile-position-1-3 {*/
  /*-webkit-transform: translate(0, 3.38rem);*/
  /*-moz-transform: translate(0, 3.38rem);*/
  /*-ms-transform: translate(0, 3.38rem);*/
  /*transform: translate(0, 3.38rem); }*/
/*.tile.tile-position-1-4 {*/
  /*-webkit-transform: translate(0, 5.07rem);*/
  /*-moz-transform: translate(0, 5.07rem);*/
  /*-ms-transform: translate(0, 5.07rem);*/
  /*transform: translate(0, 5.07rem); }*/
/*.tile.tile-position-2-1 {*/
  /*-webkit-transform: translate(1.69rem, 0);*/
  /*-moz-transform: translate(1.69rem, 0);*/
  /*-ms-transform: translate(1.69rem, 0);*/
  /*transform: translate(1.69rem, 0);*/
/*}*/
/*.tile.tile-position-2-2 {*/
  /*-webkit-transform: translate(1.69rem, 1.69rem);*/
  /*-moz-transform: translate(1.69rem, 1.69rem);*/
  /*-ms-transform: translate(1.69rem, 1.69rem);*/
  /*transform: translate(1.69rem, 1.69rem); }*/
/*.tile.tile-position-2-3 {*/
  /*-webkit-transform: translate(1.69rem, 3.38rem);*/
  /*-moz-transform: translate(1.69rem, 3.38rem);*/
  /*-ms-transform: translate(1.69rem, 3.38rem);*/
  /*transform: translate(1.69rem, 3.38rem); }*/
/*.tile.tile-position-2-4 {*/
  /*-webkit-transform: translate(1.69rem, 5.07rem);*/
  /*-moz-transform: translate(1.69rem, 5.07rem);*/
  /*-ms-transform: translate(1.69rem, 5.07rem);*/
  /*transform: translate(1.69rem, 5.07rem); }*/
/*.tile.tile-position-3-1 {*/
  /*-webkit-transform: translate(3.38rem, 0);*/
  /*-moz-transform: translate(3.38rem, 0);*/
  /*-ms-transform: translate(3.38rem, 0);*/
  /*transform: translate(3.38rem, 0); }*/
/*.tile.tile-position-3-2 {*/
  /*-webkit-transform: translate(3.38rem, 1.69rem);*/
  /*-moz-transform: translate(3.38rem, 1.69rem);*/
  /*-ms-transform: translate(3.38rem, 1.69rem);*/
  /*transform: translate(3.38rem, 1.69rem); }*/
/*.tile.tile-position-3-3 {*/
  /*-webkit-transform: translate(3.38rem, 3.38rem);*/
  /*-moz-transform: translate(3.38rem, 3.38rem);*/
  /*-ms-transform: translate(3.38rem, 3.38rem);*/
  /*transform: translate(3.38rem, 3.38rem); }*/
/*.tile.tile-position-3-4 {*/
  /*-webkit-transform: translate(3.38rem, 5.07rem);*/
  /*-moz-transform: translate(3.38rem, 5.07rem);*/
  /*-ms-transform: translate(3.38rem, 5.07rem);*/
  /*transform: translate(3.38rem, 5.07rem); }*/
/*.tile.tile-position-4-1 {*/
  /*-webkit-transform: translate(5.07rem, 0);*/
  /*-moz-transform: translate(5.07rem, 0);*/
  /*-ms-transform: translate(5.07rem, 0);*/
  /*transform: translate(5.07rem, 0); }*/
/*.tile.tile-position-4-2 {*/
  /*-webkit-transform: translate(5.07rem, 1.69rem);*/
  /*-moz-transform: translate(5.07rem, 1.69rem);*/
  /*-ms-transform: translate(5.07rem, 1.69rem);*/
  /*transform: translate(5.07rem, 1.69rem); }*/
/*.tile.tile-position-4-3 {*/
  /*-webkit-transform: translate(5.07rem, 3.38rem);*/
  /*-moz-transform: translate(5.07rem, 3.38rem);*/
  /*-ms-transform: translate(5.07rem, 3.38rem);*/
  /*transform: translate(5.07rem, 3.38rem); }*/
/*.tile.tile-position-4-4 {*/
  /*-webkit-transform: translate(5.07rem, 5.07rem);*/
  /*-moz-transform: translate(5.07rem, 5.07rem);*/
  /*-ms-transform: translate(5.07rem, 5.07rem);*/
  /*transform: translate(5.07rem, 5.07rem); }*/

.tile {
  position: absolute;
  -webkit-transition: 100ms ease-in-out;
  -moz-transition: 100ms ease-in-out;
  transition: 100ms ease-in-out;
  -webkit-transition-property: -webkit-transform;
  -moz-transition-property: -moz-transform;
  transition-property: transform; }
  .tile .tile-inner {
    border-radius: 5px;
    background: #eee4da;
    text-align: center;
    font-weight: bold;
    z-index: 10;
    font-size: 55px;
    width:1.39rem;
    height:1.37rem;
    margin:.05rem 0 0 .04rem;
    position:relative;
  }
  .tile.tile-2 .tile-inner {
    color:#010101;
    background: #d2ebff;
    box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0), inset 0 0 0 1px rgba(255, 255, 255, 0); }
  .tile.tile-4 .tile-inner {
    color:#010101;
    background: #64c8ff;
    box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0), inset 0 0 0 1px rgba(255, 255, 255, 0); }
  .tile.tile-8 .tile-inner {
    color: #010101;
    background: #8dc6ff; }
  .tile.tile-16 .tile-inner {
    color: #010101;
    background: #77f7e8; }
  .tile.tile-32 .tile-inner {
    color: #010101;
    background: #00c3ff; }
  .tile.tile-64 .tile-inner {
    color: #010101;
    background: #a588ff; }
  .tile.tile-128 .tile-inner {
    color: #010101;
    background: #c658e0;
    font-size: .7rem; }
  .tile.tile-256 .tile-inner {
    color: #010101;
    background: #ffc057;
    font-size: .7rem; }
  .tile.tile-512 .tile-inner {
    color: #010101;
    background: #ff8661;
    font-size: .7rem; }
  .tile.tile-1024 .tile-inner {
    color: #010101;
    background: #ff7676;
    font-size: 17px; }
  .tile.tile-2048 .tile-inner {
    color: #010101;
    background: #ff5555;
    font-size: 17px; }
  .tile.tile-super .tile-inner {
    color: #010101;
    background: #ff5555;
    font-size: 15px; }

@-webkit-keyframes appear {
  0% {
    opacity: 0;
    -webkit-transform: scale(0);
    -moz-transform: scale(0);
    -ms-transform: scale(0);
    transform: scale(0); }

  100% {
    opacity: 1;
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    -ms-transform: scale(1);
    transform: scale(1); } }
@-moz-keyframes appear {
  0% {
    opacity: 0;
    -webkit-transform: scale(0);
    -moz-transform: scale(0);
    -ms-transform: scale(0);
    transform: scale(0); }

  100% {
    opacity: 1;
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    -ms-transform: scale(1);
    transform: scale(1); } }
@keyframes appear {
  0% {
    opacity: 0;
    -webkit-transform: scale(0);
    -moz-transform: scale(0);
    -ms-transform: scale(0);
    transform: scale(0); }

  100% {
    opacity: 1;
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    -ms-transform: scale(1);
    transform: scale(1); } }
.tile-new .tile-inner {
  -webkit-animation: appear 200ms ease 100ms;
  -moz-animation: appear 200ms ease 100ms;
  animation: appear 200ms ease 100ms;
  -webkit-animation-fill-mode: backwards;
  -moz-animation-fill-mode: backwards;
  animation-fill-mode: backwards; }

@-webkit-keyframes pop {
  0% {
    -webkit-transform: scale(0);
    -moz-transform: scale(0);
    -ms-transform: scale(0);
    transform: scale(0); }

  50% {
    -webkit-transform: scale(1.2);
    -moz-transform: scale(1.2);
    -ms-transform: scale(1.2);
    transform: scale(1.2); }

  100% {
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    -ms-transform: scale(1);
    transform: scale(1); } }
@-moz-keyframes pop {
  0% {
    -webkit-transform: scale(0);
    -moz-transform: scale(0);
    -ms-transform: scale(0);
    transform: scale(0); }

  50% {
    -webkit-transform: scale(1.2);
    -moz-transform: scale(1.2);
    -ms-transform: scale(1.2);
    transform: scale(1.2); }

  100% {
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    -ms-transform: scale(1);
    transform: scale(1); } }
@keyframes pop {
  0% {
    -webkit-transform: scale(0);
    -moz-transform: scale(0);
    -ms-transform: scale(0);
    transform: scale(0); }

  50% {
    -webkit-transform: scale(1.2);
    -moz-transform: scale(1.2);
    -ms-transform: scale(1.2);
    transform: scale(1.2); }

  100% {
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    -ms-transform: scale(1);
    transform: scale(1); } }
.tile-merged .tile-inner {
  z-index: 20;
  -webkit-animation: pop 200ms ease 100ms;
  -moz-animation: pop 200ms ease 100ms;
  animation: pop 200ms ease 100ms;
  -webkit-animation-fill-mode: backwards;
  -moz-animation-fill-mode: backwards;
  animation-fill-mode: backwards; }

.above-game:after {
  content: "";
  display: block;
  clear: both; }

.game-intro {
  float: left;
  line-height: 42px;
  margin-bottom: 0; }

.restart-button {
  display: inline-block;
  border-radius: 3px;
  text-decoration: none;
  color: #000;
  height: 100%;
  display: block;
  text-align: center;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  }

.game-explanation {
  margin-top: 50px; }

@media screen and (min-width: 320px){
  .game-container {
    position: relative;
  }
  .grid-container{
    width: 280px;
    height: 280px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -140px;
    margin-top: -140px;
  }
  .tile-container{
    width: 280px;
    height: 280px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -140px;
    margin-top: -140px;
  }
  .grid-cell {
    width: 64px;
    height: 64px;
    margin-right: 8px;
    float: left;
    border-radius: 7px;
    background: #ddd5af;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    border: 2px solid #000;
  }
  .grid-cell:last-child {
    margin-right: 0;
  }
  .grid-row {
    margin-bottom: 8px;
  }
  .grid-row:last-child {
    margin-bottom: 0;
  }
  .tile .tile-inner {
    border-radius: 5px;
    background: #eee4da;
    text-align: center;
    font-weight: bold;
    z-index: 10;
    font-size: 55px;
    width: 60px;
    height: 60px;
    margin: 2px 0 0 2px;
    position: relative;
  }
  .tile, .tile .tile-inner {
    width: 60px;
    height: 60px;
    line-height: 60px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
  }
  .tile.tile-position-1-1 {
    -webkit-transform: translate(0, 0);
    -moz-transform: translate(0, 0);
    -ms-transform: translate(0, 0);
    transform: translate(0, 0); }
  .tile.tile-position-1-2 {
    -webkit-transform: translate(0, 72px);
    -moz-transform: translate(0, 72px);
    -ms-transform: translate(0, 72px);
    transform: translate(0, 72px); }
  .tile.tile-position-1-3 {
    -webkit-transform: translate(0, 144px);
    -moz-transform: translate(0, 144px);
    -ms-transform: translate(0, 144px);
    transform: translate(0, 144px); }
  .tile.tile-position-1-4 {
    -webkit-transform: translate(0, 216px);
    -moz-transform: translate(0, 216px);
    -ms-transform: translate(0, 216px);
    transform: translate(0, 216px); }
  .tile.tile-position-2-1 {
    -webkit-transform: translate(72px, 0);
    -moz-transform: translate(72px, 0);
    -ms-transform: translate(72px, 0);
    transform: translate(72px, 0);
  }
  .tile.tile-position-2-2 {
    -webkit-transform: translate(72px, 72px);
    -moz-transform: translate(72px, 72px);
    -ms-transform: translate(72px, 72px);
    transform: translate(72px, 72px); }
  .tile.tile-position-2-3 {
    -webkit-transform: translate(72px, 144px);
    -moz-transform: translate(72px, 144px);
    -ms-transform: translate(72px, 144px);
    transform: translate(72px, 144px); }
  .tile.tile-position-2-4 {
    -webkit-transform: translate(72px, 216px);
    -moz-transform: translate(72px, 216px);
    -ms-transform: translate(72px, 216px);
    transform: translate(72px, 216px); }
  .tile.tile-position-3-1 {
    -webkit-transform: translate(144px, 0);
    -moz-transform: translate(144px, 0);
    -ms-transform: translate(144px, 0);
    transform: translate(144px, 0); }
  .tile.tile-position-3-2 {
    -webkit-transform: translate(144px, 72px);
    -moz-transform: translate(144px, 72px);
    -ms-transform: translate(144px, 72px);
    transform: translate(144px, 72px); }
  .tile.tile-position-3-3 {
    -webkit-transform: translate(144px, 144px);
    -moz-transform: translate(144px, 144px);
    -ms-transform: translate(144px, 144px);
    transform: translate(144px, 144px); }
  .tile.tile-position-3-4 {
    -webkit-transform: translate(144px, 216px);
    -moz-transform: translate(144px, 216px);
    -ms-transform: translate(144px, 216px);
    transform: translate(144px, 216px); }
  .tile.tile-position-4-1 {
    -webkit-transform: translate(216px, 0);
    -moz-transform: translate(216px, 0);
    -ms-transform: translate(216px, 0);
    transform: translate(216px, 0); }
  .tile.tile-position-4-2 {
    -webkit-transform: translate(216px, 72px);
    -moz-transform: translate(216px, 72px);
    -ms-transform: translate(216px, 72px);
    transform: translate(216px, 72px); }
  .tile.tile-position-4-3 {
    -webkit-transform: translate(216px, 144px);
    -moz-transform: translate(216px, 144px);
    -ms-transform: translate(216px, 144px);
    transform: translate(216px, 144px); }
  .tile.tile-position-4-4 {
    -webkit-transform: translate(216px, 216px);
    -moz-transform: translate(216px, 216px);
    -ms-transform: translate(216px, 216px);
    transform: translate(216px, 216px); }
}

@media screen and (min-width: 375px) {
  .game-container {
    position: relative;
  }
  .grid-container{
    width: 320px;
    height: 320px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -160px;
    margin-top: -160px;
  }
  .tile-container{
    width: 320px;
    height: 320px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -160px;
    margin-top: -160px;
  }
  .grid-cell {
    width: 74px;
    height: 74px;
    margin-right: 8px;
    float: left;
    border-radius: 7px;
    background: #ddd5af;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    border: 2px solid #000;
  }
  .grid-cell:last-child {
    margin-right: 0;
  }
  .grid-row {
    margin-bottom: 8px;
  }
  .grid-row:last-child {
    margin-bottom: 0;
  }
  .tile .tile-inner {
    border-radius: 5px;
    background: #eee4da;
    text-align: center;
    font-weight: bold;
    z-index: 10;
    font-size: 55px;
    width: 70px;
    height: 70px;
    margin: 2px 0 0 2px;
    position: relative;
  }
  .tile, .tile .tile-inner {
    width: 70px;
    height: 70px;
    line-height: 70px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
  }
  .tile.tile-position-1-1 {
    -webkit-transform: translate(0, 0);
    -moz-transform: translate(0, 0);
    -ms-transform: translate(0, 0);
    transform: translate(0, 0); }
  .tile.tile-position-1-2 {
    -webkit-transform: translate(0, 82px);
    -moz-transform: translate(0, 82px);
    -ms-transform: translate(0, 82px);
    transform: translate(0, 82px); }
  .tile.tile-position-1-3 {
    -webkit-transform: translate(0, 164px);
    -moz-transform: translate(0, 164px);
    -ms-transform: translate(0, 164px);
    transform: translate(0, 164px); }
  .tile.tile-position-1-4 {
    -webkit-transform: translate(0, 246px);
    -moz-transform: translate(0, 246px);
    -ms-transform: translate(0, 246px);
    transform: translate(0, 246px); }
  .tile.tile-position-2-1 {
    -webkit-transform: translate(82px, 0);
    -moz-transform: translate(82px, 0);
    -ms-transform: translate(82px, 0);
    transform: translate(82px, 0);
  }
  .tile.tile-position-2-2 {
    -webkit-transform: translate(82px, 82px);
    -moz-transform: translate(82px, 82px);
    -ms-transform: translate(82px, 82px);
    transform: translate(82px, 82px); }
  .tile.tile-position-2-3 {
    -webkit-transform: translate(82px, 164px);
    -moz-transform: translate(82px, 164px);
    -ms-transform: translate(82px, 164px);
    transform: translate(82px, 164px); }
  .tile.tile-position-2-4 {
    -webkit-transform: translate(82px, 246px);
    -moz-transform: translate(82px, 246px);
    -ms-transform: translate(82px, 246px);
    transform: translate(82px, 246px); }
  .tile.tile-position-3-1 {
    -webkit-transform: translate(164px, 0);
    -moz-transform: translate(164px, 0);
    -ms-transform: translate(164px, 0);
    transform: translate(164px, 0); }
  .tile.tile-position-3-2 {
    -webkit-transform: translate(164px, 82px);
    -moz-transform: translate(164px, 82px);
    -ms-transform: translate(164px, 82px);
    transform: translate(164px, 82px); }
  .tile.tile-position-3-3 {
    -webkit-transform: translate(164px, 164px);
    -moz-transform: translate(164px, 164px);
    -ms-transform: translate(164px, 164px);
    transform: translate(164px, 164px); }
  .tile.tile-position-3-4 {
    -webkit-transform: translate(164px, 246px);
    -moz-transform: translate(164px, 246px);
    -ms-transform: translate(164px, 246px);
    transform: translate(164px, 246px); }
  .tile.tile-position-4-1 {
    -webkit-transform: translate(246px, 0);
    -moz-transform: translate(246px, 0);
    -ms-transform: translate(246px, 0);
    transform: translate(246px, 0); }
  .tile.tile-position-4-2 {
    -webkit-transform: translate(246px, 82px);
    -moz-transform: translate(246px, 82px);
    -ms-transform: translate(226px, 82px);
    transform: translate(246px, 82px); }
  .tile.tile-position-4-3 {
    -webkit-transform: translate(246px, 164px);
    -moz-transform: translate(246px, 164px);
    -ms-transform: translate(246px, 164px);
    transform: translate(246px, 164px); }
  .tile.tile-position-4-4 {
    -webkit-transform: translate(246px, 246px);
    -moz-transform: translate(246px, 246px);
    -ms-transform: translate(246px, 246px);
    transform: translate(246px, 246px); }
}

@media screen and (min-width: 410px) {
  .game-container {
    position: relative;
  }
  .grid-container{
    width: 360px;
    height: 360px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -180px;
    margin-top: -180px;
  }
  .tile-container{
    width: 360px;
    height: 360px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -180px;
    margin-top: -180px;
  }
  .grid-cell {
    width: 84px;
    height: 84px;
    margin-right: 8px;
    float: left;
    border-radius: 7px;
    background: #ddd5af;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    border: 2px solid #000;
  }
  .grid-cell:last-child {
    margin-right: 0;
  }
  .grid-row {
    margin-bottom: 8px;
  }
  .grid-row:last-child {
    margin-bottom: 0;
  }
  .tile .tile-inner {
    border-radius: 5px;
    background: #eee4da;
    text-align: center;
    font-weight: bold;
    z-index: 10;
    font-size: 55px;
    width: 80px;
    height: 80px;
    margin: 2px 0 0 2px;
    position: relative;
  }
  .tile, .tile .tile-inner {
    width: 80px;
    height: 80px;
    line-height: 80px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
  }
  .tile.tile-position-1-1 {
    -webkit-transform: translate(0, 0);
    -moz-transform: translate(0, 0);
    -ms-transform: translate(0, 0);
    transform: translate(0, 0); }
  .tile.tile-position-1-2 {
    -webkit-transform: translate(0, 92px);
    -moz-transform: translate(0, 92px);
    -ms-transform: translate(0, 92px);
    transform: translate(0, 92px); }
  .tile.tile-position-1-3 {
    -webkit-transform: translate(0, 184px);
    -moz-transform: translate(0, 184px);
    -ms-transform: translate(0, 184px);
    transform: translate(0, 184px); }
  .tile.tile-position-1-4 {
    -webkit-transform: translate(0, 276px);
    -moz-transform: translate(0, 276px);
    -ms-transform: translate(0, 276px);
    transform: translate(0, 276px); }
  .tile.tile-position-2-1 {
    -webkit-transform: translate(92px, 0);
    -moz-transform: translate(92px, 0);
    -ms-transform: translate(92px, 0);
    transform: translate(92px, 0);
  }
  .tile.tile-position-2-2 {
    -webkit-transform: translate(92px, 92px);
    -moz-transform: translate(92px, 92px);
    -ms-transform: translate(92px, 92px);
    transform: translate(92px, 92px); }
  .tile.tile-position-2-3 {
    -webkit-transform: translate(92px, 184px);
    -moz-transform: translate(92px, 184px);
    -ms-transform: translate(92px, 184px);
    transform: translate(92px, 184px); }
  .tile.tile-position-2-4 {
    -webkit-transform: translate(92px, 276px);
    -moz-transform: translate(92px, 276px);
    -ms-transform: translate(92px, 276px);
    transform: translate(92px, 276px); }
  .tile.tile-position-3-1 {
    -webkit-transform: translate(184px, 0);
    -moz-transform: translate(184px, 0);
    -ms-transform: translate(184px, 0);
    transform: translate(184px, 0); }
  .tile.tile-position-3-2 {
    -webkit-transform: translate(184px, 92px);
    -moz-transform: translate(184px, 92px);
    -ms-transform: translate(184px, 92px);
    transform: translate(184px, 92px); }
  .tile.tile-position-3-3 {
    -webkit-transform: translate(184px, 184px);
    -moz-transform: translate(184px, 184px);
    -ms-transform: translate(184px, 184px);
    transform: translate(184px, 184px); }
  .tile.tile-position-3-4 {
    -webkit-transform: translate(184px, 276px);
    -moz-transform: translate(184px, 276px);
    -ms-transform: translate(184px, 276px);
    transform: translate(184px, 276px); }
  .tile.tile-position-4-1 {
    -webkit-transform: translate(276px, 0);
    -moz-transform: translate(276px, 0);
    -ms-transform: translate(276px, 0);
    transform: translate(276px, 0); }
  .tile.tile-position-4-2 {
    -webkit-transform: translate(276px, 92px);
    -moz-transform: translate(276px, 92px);
    -ms-transform: translate(276px, 92px);
    transform: translate(276px, 92px); }
  .tile.tile-position-4-3 {
    -webkit-transform: translate(276px, 184px);
    -moz-transform: translate(276px, 184px);
    -ms-transform: translate(276px, 184px);
    transform: translate(276px, 184px); }
  .tile.tile-position-4-4 {
    -webkit-transform: translate(276px, 276px);
    -moz-transform: translate(276px, 276px);
    -ms-transform: translate(276px, 276px);
    transform: translate(276px, 276px); }
}

@media screen and (min-width: 520px) {
  html, body {
    font-size: 15px; }

  body {}

  h1.title {
    font-size: 27px;
    margin-top: 15px;
  }
  .score-container, .best-container {
    margin-top: 0;
  }

  .heading {}

  .game-intro {
    width: 55%;
    display: block;
    box-sizing: border-box;
    line-height: 1.65; }

  .game-container {
    position: relative;
    cursor: default;
    -webkit-touch-callout: none;
    -ms-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -ms-touch-action: none;
    touch-action: none;
    background: #f5f1da;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box; }
    .game-container .game-message {
      display: none;
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      background: rgba(238, 228, 218, 0.5);
      z-index: 100;
      text-align: center;
    }
      .game-container .game-message p {
        font-size: 60px;
        font-weight: bold;
        height: 60px;
        line-height: 60px;
        margin-top: 222px; }
      .game-container .game-message .lower {
        display: block;
        margin-top: 59px; }
      .game-container .game-message a {
        display: inline-block;
        background: #8f7a66;
        border-radius: 3px;
        padding: 0 20px;
        text-decoration: none;
        color: #f9f6f2;
        height: 40px;
        line-height: 42px;
        margin-left: 9px; }
        .game-container .game-message a.keep-playing-button {
          display: none; }
      .game-container .game-message.game-won {
        background: rgba(237, 194, 46, 0.5);
        color: #f9f6f2; }
        .game-container .game-message.game-won a.keep-playing-button {
          display: inline-block; }
      .game-container .game-message.game-won, .game-container .game-message.game-over {
        display: none; }

  .grid-container {
    position: absolute;
    z-index: 1;
  }

  /*.grid-row {*/
    /*margin-bottom: .22rem; }*/
    .grid-row:last-child {
      margin-bottom: 0; }
    .grid-row:after {
      content: "";
      display: block;
      clear: both; }

    .grid-cell:last-child {
      margin-right: 0; }

  .tile-container {
    position: absolute;
    z-index: 2; }


  .tile .tile-inner {
    font-size: .65rem; }

  .game-message p {
    font-size: 30px !important;
    height: 30px !important;
    line-height: 30px !important;
    margin-top: 90px !important; }
  .game-message .lower {
    margin-top: 30px !important; }
}